/* 
- Compactador
  http://www.phpblog.com.br/exemplos/encodejavascript/index.php
  
*/

/*
*
*	Has error
*
*/
function hasError(valor){

	$("#"+valor).removeClass("has-error");
	$("#"+valor).addClass("has-error");
	
};

function replaceAll(str,replace,with_this){
    var str_hasil ="";
    var temp;

    for(var i=0;i<str.length;i++){ // not need to be equal. it causes the last change: undefined..
        if (str[i] == replace){
            temp = with_this;
        }else{
                temp = str[i];
        }

        str_hasil += temp;
    }

    return str_hasil;
};